#include <iostream>
using namespace std;

const int N = 1e5 + 10;
int l[N], r[N];
int n, k;

int check(int i)
{
    int sum = 0;
    for (int j = 1; j <= n; j++)
    {
        sum += ((l[j] / i) * (r[j] / i));
    }
    return sum;

}

int main()
{
    cin >> n >> k;
    for (int i = 1; i <= n; i++) cin >> l[i] >> r[i];

    int l = 1, r = N;
    while (l < r)
    {
        int mid = (r + l + 1) >> 1;
        if (check(mid) >= k) l = mid;
        else r = mid - 1;
    }

    cout << l << endl;
    return 0;
}
